import dedup from "../../js/dedup"
let init=[]
function recordReducer(preVal=init,action) {
    let {type,data}=action
    switch (type) {
        case 'record':
            return dedup([...preVal,data])
        case 'clearRecord':
            return preVal=data
        default:
            return preVal
    }
}
export default recordReducer